from django import template

from lib.helpers import reverse

register = template.Library()

@register.simple_tag
def history_url(object):
    return reverse('history_list', object.__class__.__name__.lower(), object.pk)


@register.simple_tag
def revert_url(object, revision):
    return reverse('history_revert', object.__class__.__name__.lower(), object.pk, revision)
